using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EcsSiteDSTableAdapters;
using System.ComponentModel;        

namespace SiteECSWeb
{
    
    [DataObject]
    public class CountryBLL
    {
        
        private CountryTableAdapter _CountryTableAdapter = null;

        protected CountryTableAdapter CountyTableAdapter
        {
            get
            {
                if (_CountryTableAdapter == null)
                {
                    _CountryTableAdapter = new CountryTableAdapter();
                }
                return _CountryTableAdapter;
            }
        }

        #region SelectCountry
        // Get All Country Data//
        [DataObjectMethodAttribute(DataObjectMethodType.Select, true)]
        public EcsSiteDS.CountryDataTable GetAllCountryData()
        {
            return CountyTableAdapter.GetCountryRowRankData();

        }

        [DataObjectMethodAttribute(DataObjectMethodType.Select, false)]
        public EcsSiteDS.CountryDataTable GetAllCountryOfficesData()
        {
            return CountyTableAdapter.GetCountryOfficesRowRankData();
        }

        [DataObjectMethodAttribute(DataObjectMethodType.Select, false)]
        public EcsSiteDS.CountryDataTable GetCountryDataByCountryName(string Cuntry_nmen)
        {
            return CountyTableAdapter.GetCountryDataByCuntrynmen(Cuntry_nmen);
        }

        [DataObjectMethodAttribute(DataObjectMethodType.Select, false)]
        public EcsSiteDS.CountryDataTable GetCountryDataByCountryID(string Cuntry_un2)
        {
            return CountyTableAdapter.GetCountryDataByCuntry_un2(Cuntry_un2);
        }

        #endregion
    }
}